better to pass reference here, because passing null pointer will crash this class.