refactored format