refactored parent and distance array refrences
added readme, fixed output text