fix bug + test coverage
what an idiot...can't even do a workout
refactor to use duplicate method
fix an xss vulnerability + refactor