changed the name of some methods, added documentation