Master code

To be continues