downgrade for php < 5.3 : can't use anonymous functions