add 2 little functions and a test