Made Function Generic