a very hacky first version