made schema and code changes for time window impl