I have a bit of code which is used in both functions, but the code which I want to move to separate function has a return statement, how can I achieve this
priva