working with dates moved to separated method