add utils for adam