simplify and correct birthyear function