bug fix and syntax updates