added method to controller