dding more functions
Calling function from gui
changes done for new code