added module instance validating and tests