update.js reworked