Re-arranged code to fit 80 columns