finished code for mod jam
 however the factor isn’t quite working yet