move view logic to view component