fixing remediation, adding better tests