proper initialization of allocated memory :P added