finished php 5.3 fix for elephant; code quality decreased 50%