Added createTask method for simplification