add smart-compile whiched modifed for personal use