added function docs