Pascal' code for assignment 2, to be merged with Mobile connection info from Elen/Michael