Foundation of evil algorithm working