Added constructor and updated method