reestructured code, now we have a DrawModel function