Reviewed engine for past window problem with rest api