New changes to make it more general

Changes to make it more general