tested some more essential functions and update comments/organized placement of helper functions