schema constructor coming up undefined