wrap helper and utility functions