refactor spec to take different string formatting