Changed the way controller works