added in data code from database and initial graphing