add get by query and id