changes to viewport.js