additional refactoring done