Updated code from TIG Meeting