added define guard for math