removed self from functions because not in the scope of a class