move highlight code into Block class