quick fix, allocating memory before start