active record implemented & working