added advanced tests, fixed {local} in them