https://github.com/andrerpena/SmartRecords