first fully working and documented version