data structures and utilities