revised to use CATextLayer