added concept of dirty attributes to entities