moved allocated memory initialization to allocation's method