Add render logic to controller