replace onRoute callback with route event