replace batch size by 32 + code clean up