remove extraneous require and change p to port