common utils method