minor updates, improved debugging