real ugly build code complete (sort-of)