should this be outside the if statement?