Fixed Seg fault due to fixed memory allocated at runtime, now allocating memory at runtime