works, but NEEDS the empty printf for some reason. also still need to gather at the end