this seems to work as long as you only want to go one layer deep