Updated functionalized version