rewritten storeBinaryData; now works for numeric, string and existing thematic/id data