First working version of AFB