changed shared argument to pointer