reformat & add some test