add another 2 better algorithms; style edit;