partially updated for latest Polymer