JMF revised

this is still probably wrong in some way