update code to work with route params