Added some code in mainActivity