restructuring.. again
puting this function back in this repo.