removed formating logic to api