amended if block