test on nested functions