Same comments as above. Also it seems that the code block ^ and this one look the same. Could you think of creating a function for that? Also if it is a code block which happens a lot in the code base then could you check if there is a general function to do the same in the code project. And if not maybe it should be a general function for the project.