decode functunality