Change the return type, and add tests