fixed docs and bugs