cleaning up all function -- still in progress, but getting there