reanmed deal match to match state
Added tests for calculator