Added the create task function

Added the create task function