Some modified on code.