update tests and cleanup
change style to be similar with the rest of the file