refactor to print year from cli