clean code for view