fixed outer constructor