add comments
fix bug