integrated code from app.'s into start.js