start making intermidiate code more object oriented