Returning the correct variable