updated comments and example