format in place along with more unit tests