Prepare to make the function generic