utility functions for mango