added mod function
final commit