removed some redunant code