added very simple hash function for formulas