calculate ability modifier