adding test branch
Updated master.js
imported relevent functions to master.js
Updated max code to use new function calls