Synthesis and functionalisation of biocompatible magnetic nanomaterials