pref service + code optimalization