first draft of viewport.js