Commented and cleaned up genYear function