I have got a lot repetition in my code and looking for a room to improvement and avoid repetition. Can somebody please help to find the best way of avoiding repetition and w