updated documentation and finished functions
updated