added flags and exports