more syntax adjustments, also added logging

a few more edits