added conditional module loading