works up to submission to php call