edited lab2, fixed recursion