better merge of max's work, reenable security group config