chart now pulls data from db
code cleanup