code parsing version 1