trying to fix the record typing problem