Revert "Removed to create more general function."

This reverts commit f816ac4c58837aeab909fd0a30ce7b22476ee767.