made it more generic