generalization of last hitting code, and removal from bots with it originally