handling navigation via events