added optional year for analyze