initi import for compute frequency function and several minor adds