Update to match willem's code