lots of changes plus fix mod4