First working version of A/A functionality (although rough)