Add variable and replaced print statements