compiling sending code, but crashes