updating correct function