work towards web main loop