use defer, as this NEEDS to be called