made small fix and removed nsuserdefaults dependency