Rename function and remove log statements