removed some mainloop allocations