setDefault function is working