function to remove buttons