Updating function implementation to match the current JEP 3