updating php + new chart format