fixed more unit tests, and renamed a dating function