Adding a few more modularized functions