changed += to .append in a few places