random staged code working - now adding non staged equivalent