When he went to Japan to meet his friends, he bowed a little to them instead of having handshakes, which is the Japanese way of greeting people.
Is this sentence correct?
It seems that the "which" refers to the action of bowing a little.
Can "which" refer to a part of a sentence like this?