Function definition should use the correct type