moved show logic to controller