refactored initializing the params to fix a bug