creating task with multiple parameters
adding error handling