Modified and comment the IsDraw function