copy code from base server example
remove code as it was all rubbish