made vanilla JavaScript version and documented the methods