modules logic