Implemented better random slides algorithm