Added some functions from lab to use