fixed error in on() caused by un-initialized routes
adding more examples