Modification on REST API functions: new_task and post