create_sub_interface to use xrange instead of range