get rid of duplicated code (directly using phpvars definitions)