added check for open body statement + unit test