non functional version compiling