Added an upgrade function..