broke out compile into a lib