use named queries

Change-Id: I86bc2bf275e1c1727e5f4621333aedea1380a9c7