compile stage