initiated compute function , added compute button