[#32] split into smaller methods