seems to be working, removed some output