refactor code...