minor fix
add function environment in advance redesigning compiling environment