Modif to modules logic