some minor updates to Cyana-input-generating query