Some new utility functions