edited the SAT.js to make the code more succinct