added some recursive functionality. user testing on self now.