Return outcome instead of printing it
Add unit tests