remove hardcoded SQL table layout and add config