added a better formula