code refactor....