The ratio of red candy to green candy in a bag is 3 to 4 if there were 36 pieces of green candy in the bag how many pieces of candy in the bag were red