Change the return value of two functions from 'void' into 'int'