pasing with patterns