added unit tests for everything except majority formula