adapting older code to the squoia setup