updated
irregular field support and more robust

extended to support irregular shaped fields and modified algorithms to
handle errors and exceptions
updated