store size as number
correct logic
fix updatedAt setting
add almost all necessary tests!