rewrite to php 5.4

rewriteing with php 5.4 trait support.