why do we need this extra logic?