UI added.
some changes in main method