Revert "removing unused function to remove warning"

This reverts commit a2e6d01eb325bd14e1f5420a5b9b21f88eb0cd3c.