removed gun handling from C++ logic