Modified compiling code up to checking occupations