added check for compounds