adding database storage and tests