little utilities and helper functions