Updated utility functions