Finished slowest implementation ever rofl