added read raw funcitons to database