consider put logic to the controller