overhaul tests to use approximate equality