got rid of extra code in semantics