August's work

All versions working. Some changes needed to PHP version