rewrite to support major changes in pry 0.10
rename hooks var