added default value for cancel => false