first working(?) version of selection and copy