changed echo arrays to simplify JS