clean up function even more