added pry and better errors