rearranged some files, added more tests and added some more functions