Main Code Added with bugs and new names