Add AIM adapter

fixes #645