working on junction frequency calculations and memory management