add comments
fix bugs for build architecture