fixed bug, speed increase