converted record to module, performance improvement