java preference class works now