change to better codex and fixy bug on test in php 5.4