first working version of PA3