wrote initial compilation code (tested now)