switched parameter and Queryflag to use revision instead of datetime in internal version lookup. still WIP