removed unneccessary code from fragments