some arrow drawing code