preferences working, clean version 29.08.2014