active record pattern initial implementation