code from the may dallasphp meeting