tidied up and tested batch methods