implemented selection via mouseclick