Monitoring script done in 60%, starting to write CAPDIV funcion in xgenscripts