formatted and added more tests