additional utility functions and definitions