more logic for controllers views