Dev/detect missing ports

- add code to detect missing input ports
- add test to test that code

fix #3