some debugging and formula fixing