handling pen up commands