improve rate generation