updated utility functions