some utlity functions added