Updated helper functions