Code to be used on my work at CMS