this will be changed to logging after the API changes needed are in master