i think this works now; merging soon