inital comment of code. still needs some refactoring to take out the internal realise dependencies.