making it php 5.2 compatible