updated history, added function documentation