back end implementation for retina.js