the code block needs to be refactored (you have already planned that)