alocate memory dynamically not on stack