Refactored code - stil transfer error