update to work on older php