M6 full prototype

a M6 prototype that fulfills all requirements
TODO: null cases, edge cases, input integrity check, user interface