fixed

there aren't any memory problems now;
sorts correctly