implemented only_last_version query option