allocate right type data