fixed, inline callback function not supported on php 5.2