only parseblock() remains to be written