fixed tests and formatting