refactor from views to components