modified program to only print books published after the year 1950