correcting hatyai 2012 b and refactoring swerc 2012 a and f