seems to be working now for small example