updated code to support guided navigation