Better random function for new neighboor search + non-drawing algorithm