declared some variables as local