change formatters to return state explicitly