Adding functionality to both functions