add new tests, remove unneeded code