add connectiontype, fix map and tests