added gates module