Define variable closer to where needed