slight optimize decode