First working version of amc