add tests, implement function, add tests in filemaker