adding generic functions