modification for upgrader function