added state & year checks to metadata api