finished and added documentation