added draw code