interpreter progress. ugly code but we are in a hurry