adding some util and setup code