left overs from andreas which we modified and used for some time