frequency calculator code added (unrun)