patch, test, re-structure tests