only add semicolon if not exists at end of statement