modified Active Record class and core file