MInor refactoring