tweaking parameters and improving logging messages