remaster of javascript assignment