added right side if block