made the prototype methods generic