Updated to include hit and miss in main functionality