Added getUps call and moved location of variable declaration