optimized record and range types

optimized record and range types