Crazy Algorithm work