feat: add impl for chap 3-4