nit: target -> currentTarget (I get confuse at some point in the code with newtarget, oldtarget assigment to target)