Removed self and added metadata function