much closer after a day's worth of debugging