make cancel button optional