add documentation for active record pattern