fixed and tidied