Adapted code to work with the (forecoming) SHARP 1.1 release