added sort and comp function
impr0ved
added deep recursion checker