Replaced encoder with decoder