fixed real compare bug and implemented date comparison