iteration 1 - refactor (following the stardard from HoangNk)