added mousedown functionality