change alloc from pointer to allocatable, supposed to be the 'right' way