renamed functions added function docs