several modifications made. inference code added