Added a preferences alternative. Not tested at all.