drew skeleton for new nesting methods / algo 3 modified to 3.1
forgot to comment out old algo