working php file; write some docs