decode ways reimpl