code from ben, corica, and james