added redirection code for buttons