reduce the number of database access