bad attempt at writing queries for #4244