simplified php fork of ensl gather