adding complex unit test and amending cov.hpp to deal with complex