Local function defintion added