improved tests to be more accurate