Removing old function from Main now that it has been implemented in the api endpoint