some support functions added