added active record supoort to mimic ruby in rails active records functionality