removed the dumb lookup array by replacing it with  sweet use of parseInt(0010, 2)