[IMP] improve query and add access right