changed initial mouse down event to onclick