minor refactoring done