remove anonymous function so works on php < 5.3
Merge pull request #3 from mojowen/master

Remove anonymous function so works on php < 5.3