move get db value to wrapper functions