implemented cmd.extend and improved function of mobility