refactor year class, remove magic numbers