Refactor format and created a hashmap that takes an integer as an option value