fixes and better doc