Made a little more generic