removing main code already existing in other class