added new tests + fixed isCompound