added settings for number of barriers