fixes and api documenting