first try at active record compatibility