forward declarations refactoring, func pointer
enviroment variables set