add more comments, improve code structure