added a clause to from_binary/3 to handle bucket type information