Baby's first unit testing (also fixed a bug)