#31: reduce db query