change compile to be lazy