- fixed potential bugs
- better documentation