a bunch of snippet codes to common use