Program to implement cognitive radio