first commit of bare PHP functionality