added draw method in polygon and line