change the rendering logic so it handles snippet param