Functional Version, with added functions.js