changed and additional stats functions
fixed syntax
fixed if clause
fixed if clause
fixed syntax error
updated documentation
new peak msg