added metadata to api, fixed minor issue