functional web app version 2, commented and documented