used for db controller