added override methods to main activity