Basic beetle code