Solutions to Black Hole Attacks in MANETs