My code for the combination of BCM and SPRAY