need to finish documenting this thing...