Part Two: storing in database