refactor code, add finder function, add system tests