added first attempt to use apply; can't unpack columns