Functions to help with robbing; tests for them