sorted out recursion bug. fuckyeah