refactor components