code refactor...