added reading from DB