Moved task into controller