added focus variable, tried to fix movement jittering