refactored the views