Changed a function implementation