updated code for newest giotto