a lot of redundant tests removed