merging and finalising the code
finalise the code merge