changes to remoteai.cpp and remoteai.h