more improvements for custom calculations