updated, i think this works