fixed tests and added some new ones