updated constructor and run methods