code for adding task to dimension