Corrected getInstance to take all mandatory parameters