add a constructor for string types and fix tabbing