trying to fix demo example but still have a bug with navcontroller