updated after a bit of testing.