added better way to set the forward handler