first pass on making it much faster