adding more flexible hanlding of different JFs