removed unnecessary variables from controller