helpers modified to compare dates properly