snippet code in usual practice