making the callback optional on the constructor