fixed indentation and n_batch bug