part way through conversion to php and screen templating