Made it more generic