update margin inversion to allow for greater than or less than symbols