use defsubst to favour speed instead of debugging