added AND-gate