Added day of year function