removed deprecated active record calls