some random improvements and further debugginz