adapted code to comply with giotto changes