Various code sample for different scenario