recursion gone, checks file, needs tested