Got Danny's code working