Added heuristic, not done, app crashes