fixes test and formatting issues