added equation handling