add const& qualifiers to function objs where possible
combine the test functions using a template