improve comments and syntax