some snippet codes