Capacity of a class of relay channels with state