split into front and back; create stdio