added pointers references and functions