updated mousedown functionality