add waitkey to friend