getTask should be encapsulated