removed boundaries function