Pastable version of Copy-Paste code with internal return statement - How do I refactor the duplicated code