changed active records functionality