added support functions

added support functions