message generation in js now working, connection to backend untested