Updated Controller (Commiting Rajat's Changes)