add mainfragment
sort out code