moved the definitions up top