restructuring and introduced timeout on compiling