more pseudo for chapt 2