updated functions in comms.cpp to use new library functions. Not compiling