refactored into standard format