borrow framework from Viewpoint.js