modified the way of obtaining a birthdate