added basic precedence rules