added generics functions