added sats code to sent string, and tidy up of main loop