modified to have servertype as first param