removed a useless print, shuffled the logging