added generic functions