Added methods to controller file