Working BUID code. Very fast, <20s