move code to new AR api