working with jfed and sfi. Some Debug prints removed