re-using charts function was hacktastic