Moved to controller