cancel implemented, not working properly