Preliminary code for smashing