nearly done for now, need to check indentation
Further styling added