add comments and fix error comments
add version method