mm it should be more general, seems not a good place to put the code, since we got different type of data