adding cancel method