removed $right and $left variables