David established as king