add comment and build global code environment