added condition to remove button