ensuring arrays for  and
indentation
adding log parameter