modify code in ability model