follows interface for ->decode() method