add comments and docs