extract.bins function

Extract bins from "bins"