dynamically populate total