adding the compute method definition and an initialize method