lots of experimental code of various stages of working