implemented upgrade command