implemented proper equation rendering