hairpin loop function. There are any references about hairpin loop function in here. you can look below.