Modified MainActivity