added generic  support