merged with new shelf.js