replace cancel button with back functionality