add if statements to modules