format code and add comment