updated to use tryNest