Common utilities and helper