Refactor format