Added functionality to some functions