halfway into making storegen read from db