fix algoritm s[ it doesnt bother with number of unsued slots