added methods to controller