corrected constructor