fix #1, break formula into small pieces