added risk calculator, needs to be debugged but general framework established