change function to use nullptr default