finish adding the in the calculate function, still need event listeners and schedule function