added explicit variables scope