added license because i can, and also changed some stuff in mod.c