constructor updated to working version!