modify blocking function