added formating of the state