fixing direction callbacks and adding 'any'