refactor data list size calculation