Added display() function containing most of the PHP