babylon helper functions