implemented cancel button