some util and general changes