For Hashem is the one working in you, both to will and to work according to His chafetz (good pleasure of His will).