trying to make cancel button work