Update main.js

added even odd code (unfinished)