implementation mostly there, but will probably tweak things unpredictably as time goes on