common utils class and function