add support for all status type (ostatus) and replase case with if