update 3rd function