more ugly code for interpreter