Created two new helper functions