basic structure in place, crashes when sending chat message however