wrote vanilla js for this application