Code for AR using a different library...
seems to work, but slow... :(