added support for permissions, optional columns