refactored flag mechanism, readded column meta data